package com.example.community.service;

import com.example.community.CommunityApplication;
import com.example.community.entity.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.ArrayList;
import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest
@ContextConfiguration(classes = CommunityApplication.class)
public class testAll {
    @Autowired
    private UserService userService;

    @Test
    public void test(){
        List<User> userList = new ArrayList<>();
        userList = userService.findAllUser(0,10);
        for (User user : userList){
            System.out.println(user);
        }
    }
}
